import axios from "@/request/axios";
import {
  commonResponse,
  CategoryAddReqForm,
  DishListReqForm,
  DishListResForm,
  DishAddReqForm,
  DishSingleReqForm,
  DishSingleResForm,
  DishByCategoryReqForm,
} from "@/entity/entityDefine";

export const dishList = (data: DishListReqForm) => {
  return axios.get<DishListResForm>("/dish/page", data);
};

export const dishAdd = (data: DishAddReqForm) => {
  return axios.post<commonResponse>("/dish/", data);
};

export const dishById = (data: DishSingleReqForm) => {
  return axios.get<DishSingleResForm>("/dish/getSingle", data);
};

export const dishUpdate = (data: DishAddReqForm) => {
  return axios.put<commonResponse>("/dish/", data);
};

export const dishByCategoryId = (data: DishByCategoryReqForm) => {
  return axios.get<DishListResForm>("/dish/list", data);
};

// export const employeeStateUpdate = (data: EmployeeStateUpdateReq) => {
//   return axios.put<commonResponse>("/employee/", data);
// };
